# *****************************************************
# 实验文件夹: 01_development_environment
# 作者: 李承硕
# *****************************************************

# 定义一个列表，列表中的每一项是 元组：(汉字, (部件1, 部件2))
parts_list = [
    ("仓", ("人", "㔾")),
    ("颉", ("吉", "页")),
    ("明", ("日", "月")),
    ("林", ("木", "木")),
    ("好", ("女", "子"))
]

def analyze(char: str) -> str:
    for entry in parts_list:
        if entry[0] == char:
            parts = entry[1]
            return f"{char}由{parts[0]}和{parts[1]}组成"
    return f"{char}暂时不支持解析"


def main() -> int:
    test_chars = ["仓", "颉", "明", "林", "好", "未定义"]

    for char in test_chars:
        result = analyze(char)
        print(result)

    return 0


if __name__ == "__main__":
    main()
